M = {}

M.shell_call = function(args)
	local output = vim.fn.system(args)
	assert(vim.v.shell_error == 0, "External call failed with error code: " .. vim.v.shell_error .. "\n" .. output)
	vim.notify(output)
end

return M

-- 测试:
-- :lua require('hello.shell').shell_call("ls")
-- :lua require('hello.shell').shell_call("exit 1")
